package com.shuqi.model.bean;

import java.util.Arrays;

/**
 * 书籍相关信息
 * 
 * @author zhangpeng
 */
public class ChapterInfo {

    private final int PRE_CHAPTER = 0;
    private final int CUR_CHAPTER = 1;
    private final int NEXT_CHAPTER = 2;

    private String bookId;
    private String uid;
    private int[] oids = new int[3];// 上一章,当前章,下一章
    private String[] cids = new String[3];// 上一章,当前章,下一章
    private String[] payModes = new String[3];// 支付模式,0,免费章节,1全本,2按章,3全本免费章节
    private String[] paids = new String[3];// 0未付费,1是付费
    private String[] discountPrice = new String[3];// payMode=1全本价格,payMode=2章节价格(逻辑判断使用价格)
    private String[] wordCounts = new String[3];// 字数
    private String[] name = new String[3];// 章节名称

    // 当前章节信息
    private String vid;// 章节所在卷的vid
    private String curChapterType;// 1则成功,其他失败
    private String curChapterInfo;// type=1时,info存放章节内容,其他则是错误提示
    private String isUpdateCatalog;//1更新，0不更新
    private int curDownload;//1已下载，0未下载
    
    private String msg;// 返回购买信息


    @Override
    public String toString() {
        return "ChapterInfo [PRE_CHAPTER=" + PRE_CHAPTER + ", CUR_CHAPTER=" + CUR_CHAPTER
                + ", NEXT_CHAPTER=" + NEXT_CHAPTER + ", bookId=" + bookId + ", uid=" + uid
                + ", oids=" + Arrays.toString(oids) + ", cids=" + Arrays.toString(cids)
                + ", payModes=" + Arrays.toString(payModes) + ", paids=" + Arrays.toString(paids)
                + ", discountPrice=" + Arrays.toString(discountPrice) + ", wordCounts="
                + Arrays.toString(wordCounts) + ", name=" + Arrays.toString(name) + ", vid=" + vid
                + ", curChapterType=" + curChapterType + ", curChapterInfo=" + curChapterInfo
                + ", msg=" + msg + "]";
    }

    
    
    public String getIsUpdateCatalog() {
        return isUpdateCatalog;
    }



    public void setIsUpdateCatalog(String isUpdateCatalog) {
        this.isUpdateCatalog = isUpdateCatalog;
    }

    public int getCurDownload() {
        return curDownload;
    }
    
    public void setCurDownload(int curDownload) {
        this.curDownload = curDownload;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public void setCurChapterVid(String vid) {
        this.vid = vid;
    }

    public String getCurChapterVid() {
        return vid;
    }

    public void setCurChapterOid(int oid) {
        oids[CUR_CHAPTER] = oid;
    }

    public void setPreChapterOid(int oid) {
        oids[PRE_CHAPTER] = oid;
    }

    public void setNextChapterOid(int oid) {
        oids[NEXT_CHAPTER] = oid;
    }

    public int getCurChapterOid() {
        return oids[CUR_CHAPTER];
    }

    public int getPreChapterOid() {
        return oids[PRE_CHAPTER];
    }

    public int getNextChapterOid() {
        return oids[NEXT_CHAPTER];
    }

    public void setCurChapterCid(String cid) {
        cids[CUR_CHAPTER] = cid;
    }

    public void setPreChapterCid(String cid) {
        cids[PRE_CHAPTER] = cid;
    }

    public void setNextChapterCid(String cid) {
        cids[NEXT_CHAPTER] = cid;
    }

    public String getCurChapterCid() {
        return cids[CUR_CHAPTER];
    }

    public String getPreChapterCid() {
        return cids[PRE_CHAPTER];
    }

    public String getNextChapterCid() {
        return cids[NEXT_CHAPTER];
    }

    public void setCurChapterPayMode(String payMode) {
        payModes[CUR_CHAPTER] = payMode;
    }

    public void setPreChapterPayMode(String payMode) {
        payModes[PRE_CHAPTER] = payMode;
    }

    public void setNextChapterPayMode(String payMode) {
        payModes[NEXT_CHAPTER] = payMode;
    }

    public String getCurChapterPayMode() {
        return payModes[CUR_CHAPTER];
    }

    public String getPreChapterPayMode() {
        return payModes[PRE_CHAPTER];
    }

    public String getNextChapterPayMode() {
        return payModes[NEXT_CHAPTER];
    }

    public void setCurChapterPaid(String paid) {
        paids[CUR_CHAPTER] = paid;
    }

    public void setPreChapterPaid(String paid) {
        paids[PRE_CHAPTER] = paid;
    }

    public void setNextChapterPaid(String paid) {
        paids[NEXT_CHAPTER] = paid;
    }

    public String getCurChapterPaid() {
        return paids[CUR_CHAPTER];
    }

    public String getPreChapterPaid() {
        return paids[PRE_CHAPTER];
    }

    public String getNextChapterPaid() {
        return paids[NEXT_CHAPTER];
    }

    public void setCurChapterPrice(String price) {
        discountPrice[CUR_CHAPTER] = price;
    }

    public void setPreChapterPrice(String price) {
        discountPrice[PRE_CHAPTER] = price;
    }

    public void setNextChapterPrice(String price) {
        discountPrice[NEXT_CHAPTER] = price;
    }

    public String getCurChapterPrice() {
        return discountPrice[CUR_CHAPTER];
    }

    public String getPreChapterPrice() {
        return discountPrice[PRE_CHAPTER];
    }

    public String getNextChapterPrice() {
        return discountPrice[NEXT_CHAPTER];
    }

    public void setCurChapterWordCount(String wordCount) {
        wordCounts[CUR_CHAPTER] = wordCount;
    }

    public void setPreChapterWordCount(String wordCount) {
        wordCounts[PRE_CHAPTER] = wordCount;
    }

    public void setNextChapterWordCount(String wordCount) {
        wordCounts[NEXT_CHAPTER] = wordCount;
    }

    public String getCurChapterWordCount() {
        return wordCounts[CUR_CHAPTER];
    }

    public String getPreChapterWordCount() {
        return wordCounts[PRE_CHAPTER];
    }

    public String getNextChapterWordCount() {
        return wordCounts[NEXT_CHAPTER];
    }

    public String getBookId() {
        return bookId;
    }

    public void setBookId(String bookId) {
        this.bookId = bookId;
    }

    public String getUid() {
        return uid;
    }

    public void setUid(String uid) {
        this.uid = uid;
    }

    /**
     * 获取当前章节名称
     * 
     * @return
     */
    public String getCurChapterName() {
        return name[CUR_CHAPTER];
    }

    public void setCurChapterName(String chapterName) {
        this.name[CUR_CHAPTER] = chapterName;
    }

    /**
     * 获取上一章章节名称
     * 
     * @return
     */
    public String getPreChapterName() {
        return name[PRE_CHAPTER];
    }

    public void setPreChapterName(String chapterName) {
        this.name[PRE_CHAPTER] = chapterName;
    }

    /**
     * 获取下一章章节名称
     * 
     * @return
     */
    public String getNextChapterName() {
        return name[NEXT_CHAPTER];
    }

    public void setNextChapterName(String chapterName) {
        this.name[NEXT_CHAPTER] = chapterName;
    }

    /**
     * 返回 curChapterType 的值
     * 
     * @return curChapterType 1则成功获取信息,其他失败
     */

    public String getCurChapterType() {
        return curChapterType;
    }

    /**
     * 1则成功获取信息,其他失败
     * 
     * @param curChapterType
     */
    public void setCurChapterType(String curChapterType) {
        this.curChapterType = curChapterType;
    }

    /**
     * curChapterType=1时,info存放章节内容,其他则是错误提示
     * 
     * @return curChapterInfo
     */

    public String getCurChapterInfo() {
        return curChapterInfo;
    }

    /**
     * curChapterType=1时,info存放章节内容,其他则是错误提示
     * 
     * @param
     */
    public void setCurChapterInfo(String curChapterInfo) {
        this.curChapterInfo = curChapterInfo;
    }
}
